package com.snail.billing.json;

import org.json.JSONException;
import org.json.JSONObject;

public class JsonGeneralLogin extends JsonBase {

	private String sessionId;
	private String account;
	private String aid;

	public JsonGeneralLogin(String jsonString) {
		super(jsonString);
		try {
			if (getCode() == 1) {
				JSONObject json = new JSONObject(jsonString);
				if (json.has("sessionId")) {
					sessionId = json.getString("sessionId");
				}
				if (json.has("aid")) {
					aid = json.getString("aid");
				}
				if (json.has("account")) {
					account = json.getString("account");
				}
			}
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	public String getSessionId() {
		return sessionId;
	}

	public String getAccount() {
		return account;
	}

	public String getAid() {
		return aid;
	}

}
